<template>
  <div>App</div>
  <Header />
</template>

<script lang="ts">
import { defineComponent } from "vue";
import Header from "./components/Header.vue";
export default defineComponent({
  name: "App",
  components: {
    Header,
  },
  data() {
    return {
      b: 2,
    };
  },
  setup() {
    const a = 1;
    console.log("App setup");
    return { a };
  },
  beforeCreate() {
    //想要在选项式api中拿到数据,还是通过组件实例来拿
    console.log(this.a, this.b);
    console.log("App beforeCreate");
  },
  created() {
    console.log("App created");
  },
  beforeMount() {
    console.log("App beforeMount");
  },
  mounted() {
    console.log("App mounted");
  },
});
</script>

<script lang="ts"></script>

<style scoped></style>
